<template>
	<view class="page ">
		<u-navbar title="个人中心" leftIconSize="40rpx" :fixed="false" @leftClick="handleBackPress"></u-navbar>

		<view class="page-content flex_column_center_center">
			<u-icon name="checkmark-circle-fill" color="#276aee" size="104rpx"></u-icon>
			<text class="title">下单成功</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				lastPageOption: {}
			}
		},
		onLoad(option) {
			this.lastPageOption = JSON.parse(option.lastPageOptionStr || '{}')
		},
		methods: {
			handleBackPress() {
				let optionStr = Object.entries(this.lastPageOption)
					.map(item => {
						return `${item[0]}=${item[1]}`
					}).join('&')
				console.log(optionStr);
				uni.redirectTo({
					url: `/pagesMall/mallCenter/order?${optionStr}`
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		background: #F7F8FA;
	}
</style>

<style lang="scss" scoped>
	.page-content {
		padding-top: 152rpx;

		.title {
			margin-top: 36rpx;
			font-size: 40rpx;
			font-weight: bold;
			line-height: 56rpx;
		}
	}
</style>